

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Home-pc
 * Date: 2023-08-14
 * Time: 15:15
 */
public class Date {
    public int year=2023;
    public int month=8;
    public int day=14;

  /*  public Date(){
        this(2023,8,14);
        System.out.println("没有参数的构造");
    }*/

/*    Date(int year,int month,int day){
        this.year=year;
        this.month=month;
        this.day=day;
        System.out.println("含有3个参数的构造");
    }*/

   /* public Date(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }*/

    public void setDay(int year, int month, int day){
        this.year=year;
        this.month=month;
        this.day=day;
    }

    public  void printDate(){
        System.out.println(this.year+"年"+this.month+"月"+this.day+"日");
    }

    public static void main(String[] args) {
       /* Date date=new Date();
        System.out.println(date.getTime());
*/











/*        java.util.Date date=new java.util.Date();
        // 得到一个毫秒级别的时间戳
        System.out.println(date.getTime());*/












        //Date d1=new Date();
        //Date d2=new Date(1,2,3);

        //d1.setDay(2023,8,14);
        //d2.setDay(2023,8,15);

        //d1.printDate();
        //d2.printDate();
    }
}
